From: Carlos Garnacho Date: Tue, 23 Feb 2021 22:39:29 +0000 (+0100) Subject: appDisplay: Don't reset adjustment on ::pages-changed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~202 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9b24d9c4c0c08f258636d6d3388ea573336fcb9d;p=gnome-shell.git appDisplay: Don't reset adjustment on ::pages-changed Let the goToPage call afterwards to take precedence, instead of resetting the adjustment (thus the view) on the side. This resulted in strange state when the last page contains a single icon, and it is dragged. The last page being emptied triggers a pages-changed signal, which half resets the view to the first page while DnD is ongoing. Letting goToPage do its business means we neatly clamp to the closest page to currentPage, the last page in that case. Part-of: --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 94d1ef24e..0c2b97598 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -143,7 +143,6 @@ var BaseAppView = GObject.registerClass({ // Standard hack for ClutterBinLayout this._grid.x_expand = true; this._grid.connect('pages-changed', () => { - this._adjustment.value = 0; this.goToPage(this._grid.currentPage); this._pageIndicators.setNPages(this._grid.nPages); this._pageIndicators.setCurrentPosition(this._grid.currentPage);